/**
 * Created by fangshufeng on 2017/12/28.
 */

import {Modal,Input} from 'antd';
import React from 'react';
const {TextArea} = Input;

export default class MockAddBusiAlert extends React.Component {

    fixObj = () => {
        return  this.refs.busiName.textAreaRef.value;
    };

    render() {

        if (this.props.showAddBusi === 0) {
            return (null);
        }  else {
            return (
                <div>
                    <Modal
                        title="新增业务线"
                        visible={(this.props.showAddBusi)}
                        onOk={() => this.props.okAction(this.fixObj())}
                        onCancel={() => this.props.hidenAction()}
                        closable={false}
                    >
                        <p >输入业务线名称:</p>
                        <TextArea ref="busiName"
                                  defaultValue=''/>
                        <p></p>
                    </Modal>

                </div>
            );
        }
    }
}
